-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
51 reduce memory burden of pipeline #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change how the low memory stuff works, doing things in a for loop seems really unnecessary. Here is what I would do
The metrics should not care if the input is low memory or not, they should only care about volumes1, volumes2, and some arguments if necessary. The whole low memory stuff should come at the pipeline level. Here is what I would do
I would also create a low_memory_pipeline and a regular memory pipeline. All those if statements make the code very messy, and I think it'd be easy to miss something being wrong. |
Yes, good point! I forgot that the getitem takes care of indexing into sub-batches I did the masking and normalization in the subbatch. This prevents a duplication of reading it into memory (once for normalization / masking, another right before doing the m2m distance call) There is still some if low memory mode control flow. To reduce code duplication. |
Also, now the gt maps should be a .npy file, not a .pt file. I hope that |
#51
I incorporated a test validating the numerical identity of the output, so I am confident there are no errors on that side.
Before there was batch normalization and masking for all the gt maps. Since only one map is loaded in at a time, this is done on-the-fly inside the local distance computation.